home *** CD-ROM | disk | FTP | other *** search
/ mail.altrad.com / 2015.02.mail.altrad.com.tar / mail.altrad.com / TEST / office deutch / INFOPATH.NL-NL / INFLR.CAB / FL_ReturnTableAdapterOutputParameters_snip_142636_ENU____.3643236F_FC70_11D3_A536_0090278A1BB8 < prev    next >
Extensible Markup Language  |  2005-10-28  |  2KB  |  52 lines

  1. <?xml version="1.0"?>
  2. <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  3.   <CodeSnippet Format="1.0.0">
  4.     <Header>
  5.       <Title>Return Output Parameter for a TableAdapter Query</Title>
  6.       <Author>Microsoft</Author>
  7.       <Description>TableAdapter methods that "Retun No Value" use ExecuteNonQuery which returns the rows affected.  This Snippet returns the value from one of the command parameters on a TableAdapter.</Description>
  8.       <Shortcut>dtNonQueryOutParam</Shortcut>
  9.     </Header>
  10.     <Snippet>
  11.       <Declarations>
  12.         <Literal>
  13.           <ID>methodName</ID>
  14.           <Type>String</Type>
  15.           <ToolTip>Replace with the name of the new method you wish to expose on the TableAdapter.</ToolTip>
  16.           <Default>GetNonQueryOutputParameter</Default>
  17.         </Literal>
  18.         <Literal>
  19.           <ID>existingMethod</ID>
  20.           <Type>String</Type>
  21.           <ToolTip>Replace with the existing ExecuteNonQuery method on the TableAdapter.</ToolTip>
  22.           <Default>GetCustomerCount</Default>
  23.         </Literal>
  24.         <Literal>
  25.           <ID>commandIndex</ID>
  26.           <Type>Int</Type>
  27.           <ToolTip>Replace with the index of the command in the TableAdapter _commandCollection.  
  28. Hint: Select Go To Definition on the existing method to determine the index.</ToolTip>
  29.           <Default>1</Default>
  30.         </Literal>
  31.         <Literal>
  32.           <ID>parameterIndex</ID>
  33.           <Type>Int</Type>
  34.           <ToolTip>Replace with the index of the parameter that you wish to return.  
  35. Hint: Use the DataSet designer to determine the index of the parameter on the query of the TableAdapter.</ToolTip>
  36.           <Default>1</Default>
  37.         </Literal>
  38.         <Object>
  39.           <ID>dataType</ID>
  40.           <Type>System.Object</Type>
  41.           <ToolTip>Replace with the DataType the method will return.  </ToolTip>
  42.           <Default>Integer</Default>
  43.         </Object>
  44.       </Declarations>
  45.       <Code Language="VB" Kind="method decl"><![CDATA[Public Function $methodName$() As $dataType$
  46.     Me.$existingMethod$()
  47.     Return Me._commandCollection($commandIndex$).Parameters($parameterIndex$).Value
  48. End Function
  49. ]]></Code>
  50.     </Snippet>
  51.   </CodeSnippet>
  52. </CodeSnippets>